﻿<Application x:Class="ZephyrLite.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>

        <Style x:Key="AlignRight" TargetType="DataGridCell">
            <Setter Property="TextBlock.TextAlignment" Value="Right" />
        </Style>

        <Style x:Key="AlignCenter" TargetType="DataGridCell">
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
        </Style>

        <Style x:Key="AlignRightEditable" TargetType="DataGridCell">            
            <Setter Property="TextBlock.TextAlignment" Value="Right" />
            <Style.Triggers>
                <Trigger Property="DataGridCell.IsEditing" Value="True">
                    <Setter Property="Background" Value="Red" />
                    <Setter Property="BorderBrush" Value="Red" />
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DataGridCell.IsSelected" Value="True" />
                        <Condition Property="DataGridCell.IsEditing" Value="False" />
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="Red" />
                    <Setter Property="Background" Value="Yellow" />
                    <Setter Property="BorderBrush" Value="Yellow" />
                </MultiTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="AlignCenterEditable" TargetType="DataGridCell">
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
            <Style.Triggers>
                <Trigger Property="DataGridCell.IsEditing" Value="True">
                    <Setter Property="Background" Value="Red" />
                    <Setter Property="BorderBrush" Value="Red" />
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DataGridCell.IsSelected" Value="True" />
                        <Condition Property="DataGridCell.IsEditing" Value="False" />
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="Red" />
                    <Setter Property="Background" Value="Yellow" />
                    <Setter Property="BorderBrush" Value="Yellow" />
                </MultiTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="AlignLeftEditable" TargetType="DataGridCell">
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
            <Style.Triggers>
                <Trigger Property="DataGridCell.IsEditing" Value="True">
                    <Setter Property="Background" Value="Red" />
                    <Setter Property="BorderBrush" Value="Red" />
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DataGridCell.IsSelected" Value="True" />
                        <Condition Property="DataGridCell.IsEditing" Value="False" />
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="Red" />
                    <Setter Property="Background" Value="Yellow" />
                    <Setter Property="BorderBrush" Value="Yellow" />
                </MultiTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="Editable" TargetType="DataGridCell">
            <Style.Triggers>
                <Trigger Property="DataGridCell.IsEditing" Value="True">
                    <Setter Property="Background" Value="Red" />
                    <Setter Property="BorderBrush" Value="Red" />
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DataGridCell.IsSelected" Value="True" />
                        <Condition Property="DataGridCell.IsEditing" Value="False" />
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="Red" />
                    <Setter Property="Background" Value="Yellow" />
                    <Setter Property="BorderBrush" Value="Yellow" />
                </MultiTrigger>
            </Style.Triggers>
        </Style>
        
    </Application.Resources>
</Application>
